import { request } from "@/utils/request";

/**
 * 获取用户权重信息
 *
 * @param data
 */
export async function getUserWeight(data?: any) {
  return request<API.Response<any>>('plugin.breed-game.admin.weight.weight.getUserWeight', {
    ...data
  });
}

/**
 * 获取权重变更记录列表
 *
 * @param data
 * @param data.page 页码
 * @param data.pageSize 每页数量
 * @param data.type 类型：1-只获取正数记录，不传-获取所有记录
 */
export async function getWeightFlowList(data?: any) {
  return request<API.Response<any>>('plugin.breed-game.admin.weight.weight.getWeightFlowList', {
    ...data
  });
}
/**
 * 添加权重变更记录（管理员操作）
 *
 * @param data
 */
export async function addWeightFlow(data?: any) {
  return request<API.Response<any>>('plugin.breed-game.admin.weight.weight.addWeightFlow', {
    ...data
  });
}

/**
 * 使用权重（减少尚未使用值）
 *
 * @param data
 */
export async function useWeight(data?: any) {
  return request<API.Response<any>>('plugin.breed-game.admin.weight.weight.useWeight', {
    ...data
  });
}

